package com.lazycat.backend.service.impl.store;

import com.lazycat.backend.mapper.StoreMapper;
import com.lazycat.backend.pojo.Store;
import com.lazycat.backend.service.store.OpenStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OpenStoreServiceImpl implements OpenStoreService {

    @Autowired
    private StoreMapper storeMapper;
    @Override
    public void open(Integer userId, String storeName) {
        Store store = new Store(null, storeName, userId, 0);
        storeMapper.insert(store);
    }
}
